home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / tsql / doc / tsql.mail / 000073_gadia@cs.iastate.edu _Wed Apr 7 17:11:28 1993.msg < prev    next >
Text File  |  1996-01-31  |  8KB  |  218 lines

  1. Message-Id: <199304072211.AA02681@optima.cs.arizona.edu>
  2. Received: from ren.cs.iastate.edu by optima.cs.arizona.edu (5.65c/15) via SMTP
  3.     id AA02681; Wed, 7 Apr 1993 15:11:28 MST
  4. Received: by ren.cs.iastate.edu
  5.     (16.8/16.2) id AA15199; Wed, 7 Apr 93 17:11:28 -0500
  6. From: Shashi K. Gadia <gadia@cs.iastate.edu>
  7. Subject: Valid/Transaction time orthogonality
  8. To: tsql@cs.arizona.edu
  9. Date: Wed, 7 Apr 93 17:11:28 CDT
  10. Cc: gadia@cs.iastate.edu
  11. Mailer: Elm [revision: 70.30]
  12.  
  13. VALID AND TRANSACTION TIME ORTHOGONALITY.
  14. -----------------------------------------
  15.  
  16. The following is an on going discussion between 
  17. Fabio Grandi and Shashi Gadia about orthogonality 
  18. between valid and transaction times in databases.
  19. It may be of general interest.  You are welcome 
  20. to participate if you wish.  It is written in a 
  21. fairly context free style.  
  22. ==========================================================
  23.  
  24. From: Shashi K. Gadia
  25.  
  26. Dear Fabio: 
  27.  
  28. I am pleased to receive your response.  The orthogonality 
  29. between valid and transaction time goes beyond just 
  30. (A) Pure valid time, (B) Pure transaction time, and (C) Pure 
  31. bitemporal time.  I discuss it in detail below.  
  32.    
  33. Diagonal.
  34. ---------
  35. I agree that the diagonal in the bitemporal space is 
  36. of special interest.  A user having access to the 
  37. diagonal sees at once what a classical snpshot user has 
  38. seen on a day to day basis. 
  39.  
  40. User.
  41. -----
  42. In our model we introduce concept of a user.  A user is 
  43. identified by a subset of the bitemporal space, that the  
  44. user is allowed access to.  An application of this concept 
  45. of a user is to achieve the orthogonality we are discussing. 
  46. Following is an assortment of some interesting users:
  47.  
  48. A. The system user.
  49.    ----------------
  50.    This user has access to the whole bitemporal space.  
  51.  
  52. B. Audit user.
  53.    -----------
  54.    This is the user who has access to the diagonal (vt=tt) 
  55.    and below.  This user sees only present and past. 
  56.  
  57. C. The diagonal user.
  58.    ------------------
  59.    This is the diagonal user we introduced above.  
  60.  
  61. D.  Valid time user. 
  62.     -----------------
  63.     The user tt=now.  This user is just like the 
  64.     uni-dimensional valid time user. 
  65.  
  66. E.  Classical user.
  67.     ---------------
  68.     {now}x{now}
  69.  
  70. Other interesting users are possible.  Shortly, we will 
  71. introduce another user to solve one of the very interesting 
  72. problem you raised.  
  73.  
  74. The set containment leads to a user 
  75. lattice hierarchy.  For the purposes of querying, a user 
  76. is allowed to set itself equal to any user below it.  This 
  77. allows a user to simulate lower users making the hierarchy 
  78. quite meaningful.  
  79.  
  80. Now the query "when was John working in Toys" is answered 
  81. by every user in the same way:
  82.  
  83.    [[sigma(emp, NAME=John, [[DEPT=Toys]] ) ]]
  84.  
  85.    [[retrieve *
  86.      restricted to [[DEPT=Toys]]
  87.      from emp
  88.      where NAME = John]]  
  89.  
  90. THIS INCLUDES THE DIAGONAL USER. This has an interesting 
  91. lesson for us.  Why are the English queries looking so 
  92. different, syntactically, and even more so semantically, 
  93. when something stupid like an algebra is so clean??? 
  94. This happens all the time in science when new discoveries 
  95. are made.  In this case I think the algebra tell us that 
  96. we need to integrate new vocabulary into English to 
  97. make English cleaner.  In other words, in English we just 
  98. ask "when John worked in Toys" without being apologetic 
  99. about it.  Let the context (the user that we are) take 
  100. care of it.
  101.  
  102. Our algebra is generic - you apply it to valid time, 
  103. transaction time, bitemporal time, no time, even space, 
  104. and space and time.  This is the main theme of our chapter 
  105. "Temporal databases: a prelude to parametric data" 
  106. in the temporal book just published.  The paper coauthored 
  107. with Sunil Nair gives SQL which, in our case, is TRIVIALLY 
  108. derived from the algebra.  The paper is an exposition 
  109. to much of our work.  By the way I also have a chapter 
  110. on Ben-zvi's work in the same paper.  This chapter should 
  111. be of considerable interest from a historical prospective.
  112.  
  113.  
  114. YOUR NEXT QUESTION.
  115. -------------------
  116. When was John's status recorded incorrectly? 
  117.  
  118. (For other readers let me remark that in your case 
  119. the salary of an employee is determined from 
  120. the status.  So incorrect salary is paid during 
  121. the time status is recorded incorrectly in the 
  122. database.)  
  123.  
  124. Concept of error can be traced back to Ben-zvi's 
  125. bitemporal model (1979-81).  In our bitemporal 
  126. model one can query for errors.  The above 
  127. query is expressed as follows: 
  128.  
  129.   [[select * 
  130.     restrict to [[incorrect value(STATUS)]]
  131.     from emp
  132.     where NAME = John]] 
  133.  
  134. The problem is that it reports more info than you 
  135. intended in your message, because you were 
  136. only interestsd in errors along the diagonal.  
  137. It is important to note that the diagonal user is 
  138. rather naive, having no ability to differentiate 
  139. between a change and a correction.  To answer the 
  140. query in your sense, we need to set ourselves to the 
  141. user who can see the diagonal, and the current(ly 
  142. known correct version of history) which is stored in 
  143. tt = now.  Let us call it Error-user.  
  144.  
  145. Definition: Error-User = diagonal union tt=now.
  146.  
  147. If we set ourselves to Error-user, the above 
  148. query meets your objective.  
  149.  
  150.  
  151. I like to point out that this work was dome by Gautam 
  152. Bhargava and I in 1988-89.  The work includes a bitemporal 
  153. model, algebra, sql, capability for querying of errors, 
  154. querying updates, querying queries, and achieving zero 
  155. information loss in the sense any past interaction with the 
  156. database system can be reproduced at any time. 
  157.  
  158. Now some subjective comments.
  159. -----------------------------
  160. In my opinion, the work Bhargava and I did 
  161. in 1988-89 makes many things as non issues and makes 
  162. certain ideas obsolete.  For example, the concept of 
  163. a rollback database is replaced by a transaction time 
  164. database, which can be queried as a uni-directional 
  165. valid time database.  In the end we must ask: if a user 
  166. is willing to store certain amount of history, are 
  167. we giving them ability to query whatever is queriable? 
  168. Unidimensional transaction time database needs same amount 
  169. of storage as a rollback database.  But the transaction time 
  170. database allows more comprehensive querying.  This is why 
  171. concept of a rollback database is obsolete.  
  172.  
  173. What do we get in going from a unidimensional model to 
  174. a bitemporal model?  The answer is a capability to 
  175. query for errors.  If we are not giving such a capability 
  176. to the user, we are not meeting our promise.  
  177.  
  178. My summary of orthogonality. 
  179. ----------------------------
  180. What I have seen in the temporal database 
  181. literature is handled in a generic manner in 
  182. our model.  We can have zero or more dimensions, 
  183. some of then can even be spatial.  
  184.  
  185. The orthogonality is broken in in two significant 
  186. ways: 
  187.  
  188. 1. Updates (I hope this is obvious.)
  189.  
  190. 2. Extraneous information in the bitemporal model.
  191.    -----------------------------------------------
  192.    This aspect needs some explanation.  In a query above 
  193.    I used the primitive "incorrect value" and applied 
  194.    it to the STATUS attribute to retrieve the 
  195.    time domain when the STATUS has been recorded, but 
  196.    recorded incorrectly.  Other primitives are "missing 
  197.    information", and "extraneous information".  The 
  198.    extraneous information is the information about an 
  199.    object which exists in the database during the time 
  200.    the object does not exist in the real world. 
  201.  
  202.    Extraneous information is the only concept which destroys the 
  203.    orthogonality we are discussing.  This is a non-trivial 
  204.    idea.  I have not had much success in trying to publish it.  
  205.    It has received brutal rejections from one journal, and the 
  206.    four most important conferences in databases.  As a result, 
  207.    the work has remained dormant.  We have eventually 
  208.    published it in a conference proceedings, and now 
  209.    in the temporal book.  In my opinion the lack of exposure 
  210.    of this work has been the biggest obstacle to progress 
  211.    in temporal database.  Perhaps, the problem was that we 
  212.    were trying to answer questions people were not asking, 
  213.    and not asking even today, five years after the work was 
  214.    completed.  
  215.  
  216.  
  217.  
  218.